<template>
  <div ref="chartContainer" style="width: 100%; height: 400px;"></div>
</template>

<script>
  import * as echarts from 'echarts';

    export default {
      props: ['chartData'],
      mounted() {
        this.renderChart();
      },
      methods: {
        renderChart() {
          const chart = echarts.init(this.$refs.chartContainer);
          chart.setOption(this.chartData);
        }
      }
    }
</script>

<style scoped>

</style>
